/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "scsgtbarchrol")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Scsgtbarchrol.findAll", query = "SELECT s FROM Scsgtbarchrol s"),
    @NamedQuery(name = "Scsgtbarchrol.findByScsgtbarchrolid", query = "SELECT s FROM Scsgtbarchrol s WHERE s.scsgtbarchrolid = :scsgtbarchrolid"),
    @NamedQuery(name = "Scsgtbarchrol.findByArchivo", query = "SELECT s FROM Scsgtbarchrol s WHERE s.archivo = :archivo"),
    @NamedQuery(name = "Scsgtbarchrol.findByDirectorio", query = "SELECT s FROM Scsgtbarchrol s WHERE s.directorio = :directorio"),
    @NamedQuery(name = "Scsgtbarchrol.findByDescripcion", query = "SELECT s FROM Scsgtbarchrol s WHERE s.descripcion = :descripcion"),
    @NamedQuery(name = "Scsgtbarchrol.findByObservaciones", query = "SELECT s FROM Scsgtbarchrol s WHERE s.observaciones = :observaciones")})
public class Scsgtbarchrol implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "scsgtbarchrolid")
    private Integer scsgtbarchrolid;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 150)
    @Column(name = "archivo")
    private String archivo;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "directorio")
    private String directorio;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "descripcion")
    private String descripcion;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "observaciones")
    private String observaciones;
    @JoinColumn(name = "scsgtbrolesid", referencedColumnName = "scsgtbrolesid")
    @ManyToOne(optional = false)
    private Scsgtbroles scsgtbrolesid;

    public Scsgtbarchrol() {
    }

    public Scsgtbarchrol(Integer scsgtbarchrolid) {
        this.scsgtbarchrolid = scsgtbarchrolid;
    }

    public Scsgtbarchrol(Integer scsgtbarchrolid, String archivo, String directorio, String descripcion, String observaciones) {
        this.scsgtbarchrolid = scsgtbarchrolid;
        this.archivo = archivo;
        this.directorio = directorio;
        this.descripcion = descripcion;
        this.observaciones = observaciones;
    }

    public Integer getScsgtbarchrolid() {
        return scsgtbarchrolid;
    }

    public void setScsgtbarchrolid(Integer scsgtbarchrolid) {
        this.scsgtbarchrolid = scsgtbarchrolid;
    }

    public String getArchivo() {
        return archivo;
    }

    public void setArchivo(String archivo) {
        this.archivo = archivo;
    }

    public String getDirectorio() {
        return directorio;
    }

    public void setDirectorio(String directorio) {
        this.directorio = directorio;
    }

    public String getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(String descripcion) {
        this.descripcion = descripcion;
    }

    public String getObservaciones() {
        return observaciones;
    }

    public void setObservaciones(String observaciones) {
        this.observaciones = observaciones;
    }

    public Scsgtbroles getScsgtbrolesid() {
        return scsgtbrolesid;
    }

    public void setScsgtbrolesid(Scsgtbroles scsgtbrolesid) {
        this.scsgtbrolesid = scsgtbrolesid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (scsgtbarchrolid != null ? scsgtbarchrolid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Scsgtbarchrol)) {
            return false;
        }
        Scsgtbarchrol other = (Scsgtbarchrol) object;
        if ((this.scsgtbarchrolid == null && other.scsgtbarchrolid != null) || (this.scsgtbarchrolid != null && !this.scsgtbarchrolid.equals(other.scsgtbarchrolid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Scsgtbarchrol[ scsgtbarchrolid=" + scsgtbarchrolid + " ]";
    }
    
}
